<?php

require_once "Common/database.php";

echo '<P><h3>Loan Equpment</h3>';

echo '<table border=1>';
echo '<tr>';
echo '<td><a href="index.php?p=loview">All</a></td>';
$result = mysql_query("SELECT * FROM tblFolders2");
while($row = mysql_fetch_array($result))
  {
echo '<td><a href="index.php?p=loview&f2='.$row['Folder'].'">'.$row['Folder'].'</a></td>';
  }
echo '</tr></table>';
echo '<table border=1>';
echo '<tr><td>Name</td><td>Location</td><td>Delete</td></tr>';
if($_GET[f2]=='')
{
$_GET[f2]='%';
}
$result = mysql_query("SELECT * FROM tblinventory WHERE Loan = 'yes'");
while($row = mysql_fetch_array($result))
  {
echo '<form action="loan/uinsert.php" method="POST"><tr><td><input type=hidden name="ID" value="'.$row['ID'].'">'.$row['Model'].'</td><td><input type=text name="location" value="'.$row['Location'].'"></a></td><td><input type="checkbox" name="delete" value="checked"></td><td><input type=submit value=Update></td></form></tr>';
  }
echo '<tr><td><a href="index.php?p=iadd">Add</a>';
echo '</table>';
?>